package com.jushu.storbox.database;

import com.jushu.storbox.entities.PreUploadObject;

public interface IPreUploadDao extends IBaseDao {

	//table name
	public static final String TABLE_NAME = "pre_upload_table";
	
	//fileds name
	public static final String OWNER_ID = "owner_id";
	public static final String FOLDER_ID = "upload_folder_id";
	public static final String FILE_IDENTITY = "file_identity";
	public static final String LOCAL_FILEPATH = "local_filepath";
	public static final String UPLOAD_TIME = "upload_time";
	
	//table command
	public static final String TABLE_COMMAND = "Create table " + TABLE_NAME +" ("
		+ IPreUploadDao.OWNER_ID +" text,"
		+ IPreUploadDao.FOLDER_ID +" text,"
		+ IPreUploadDao.FILE_IDENTITY +" text,"
		+ IPreUploadDao.LOCAL_FILEPATH +" text,"
		+ IPreUploadDao.UPLOAD_TIME +" integer,"
		+ "CONSTRAINT pk_tb_preupload_list PRIMARY KEY ("
		+ IPreUploadDao.OWNER_ID+","+IPreUploadDao.FOLDER_ID +","+IPreUploadDao.FILE_IDENTITY+")"
		+ ")";
	
	//mothed
	public long insertPreUploadObject(PreUploadObject preuploadObj);
	public PreUploadObject getPreUploadObject(String ownerId, 
			String folderId, String identity);
	public int updataPreUploadObject(PreUploadObject preUploadObj);
}
